Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

osm-p2p-defork

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

osm-p2p-defork

convert forking osm-p2p documents into a linear history

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

osm-p2p-defork

Convert forking osm-p2p documents into a linear history.

Transforms a list of osm-p2p-db documents into a sublist with a linear (non-forking) history.

Usage

var defork = require('osm-p2p-defork')

osm.query([[-90, 90], [-180, 180]], function (err, docs) {
  docs = defork(docs)
  console.log(docs)
})

outputs the results from the osm.query(), but with a linear history (no forked documents).

API

var defork = require('osm-p2p-defork')

defork(docs)

Consumes a list of OSM documents, formatted as would be returned by osm-p2p-db's query function.

Returns the same documents, but with certain documents filtered to present a linear history.

Timestamps (a timestamp field) should be present on all documents. If they aren't, sorting happens based on the document's version field. This guarantees a non-forking history, but it will not likely be semantically what you want.

Install

With npm installed, run

$ npm install osm-p2p-defork

License

ISC

Keywords

FAQs

Package last updated on 24 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc